{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 引包\n",
    "from sklearn import datasets, cross_validation, naive_bayes\n",
    "import numpy as np\n",
    "import matplotlib.pyplot as plt"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 数据加载方法：\n",
    "def load_data():\n",
    "    digits=datasets.load_digits()\n",
    "    return cross_validation.train_test_split(digits.data, digits.target, test_size=0.25, random_state=0)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 伯努利贝叶斯 条件概率满足二项分布\n",
    "def test_BernoulliNB(*data):\n",
    "    train_x,test_x, train_y, test_y = data\n",
    "    cls = naive_bayes.BernoulliNB()\n",
    "    cls.fit(train_x,train_y)\n",
    "    print('Training Score: {0}'.format(cls.score(train_x,train_y)))\n",
    "    print('Testing Score: {0}'.format(cls.score(test_x,test_y)))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Training Score: 0.8671121009651076\n",
      "Testing Score: 0.8511111111111112\n"
     ]
    }
   ],
   "source": [
    "# 查看伯努利贝叶斯训练结果：\n",
    "train_x,test_x, train_y, test_y = load_data()\n",
    "test_BernoulliNB(train_x, test_x, train_y, test_y)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 查看不同的拉普拉斯平滑 对结果的影响：\n",
    "def test_BernoulliNB_alpha(*data):\n",
    "    train_x,test_x, train_y, test_y = data\n",
    "    alphas = np.logspace(-2, 5 ,num=200)\n",
    "    train_score = []\n",
    "    test_score = []\n",
    "    for alpha in alphas:\n",
    "        cls = naive_bayes.BernoulliNB(alpha=alpha)\n",
    "        cls.fit(train_x,train_y)\n",
    "        train_score.append(cls.score(train_x,train_y))\n",
    "        test_score.append(cls.score(test_x,test_y))\n",
    "            \n",
    "    # 绘图：\n",
    "    fig = plt.figure()\n",
    "    ax = fig.add_subplot(111)\n",
    "    ax.plot(alphas,train_score,label='Training Score')\n",
    "    ax.plot(alphas,test_score, label='Testing Score')\n",
    "    ax.set_xlabel(r'$\\alpha$')\n",
    "    ax.set_ylabel('score')\n",
    "    ax.set_ylim(0,1.0)\n",
    "    ax.set_title('BernoulliNB')\n",
    "    ax.set_xscale('log')\n",
    "    ax.legend(loc='best')\n",
    "    plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYUAAAEaCAYAAAD+E0veAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMi4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvhp/UCwAAIABJREFUeJzt3Xd4VFX+x/H3dyZl0gMJECCE3kIPESnSpIpdUcDuqqhrXVd3ddef3V107cKusooVO7KCgoCKAqJ0lE4iNXQIJKS38/vjDmMSUiYwk5mE7+t58pC598yd71zmmU/OPfeeK8YYlFJKKQCbrwtQSinlPzQUlFJKuWgoKKWUctFQUEop5aKhoJRSykVDQSmllIuGglK1RES+F5Gbnb/fICJLSq3LEpE2vqtOKYuGgqrzRGSHiOQ6v1iPishXItLC13XVhDEm3BizDUBE3hYRIyJ9TqwXkXYiYko9/l5E8pzvOUNEFolIN1/UruoXDQVVX1xojAkHmgIHgFdrugERCfB4VacuHXiqmjZ3Ot9zQ+B74D1vF6XqPw0FVa8YY/KAz4BEABEJFpHnRGSXiBwQkddEJMS5boiIpInIX0VkP/BWqWV/FpGDIrJPRG48sX0RiRKRd0XkkIjsFJGHRcTmXPeYiLxfqm0r51/81YaNs127UoveAbqLyGA33nMx8NGJ96zU6dBQUPWKiIQC44CfnYsmAR2AnkA7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uQmCC\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "# 查看伯努利贝叶斯训练结果：\n",
    "train_x,test_x, train_y, test_y = load_data()\n",
    "test_BernoulliNB_alpha(train_x, test_x, train_y, test_y)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 查看不同的binarize（二元化系数）对结果的影响：\n",
    "def test_BernoulliNB_binarize(*data):\n",
    "    train_x,test_x, train_y, test_y = data\n",
    "    min_x = min(np.min(train_x.ravel()), np.min(test_x.ravel()))-0.1\n",
    "    max_x = max(np.max(train_x.ravel()), np.min(test_x.ravel()))+0.1\n",
    "    binarizes = np.linspace(min_x, max_x, endpoint=True,num=100)\n",
    "    train_score = []\n",
    "    test_score = []\n",
    "    for binarize in binarizes:\n",
    "        cls = naive_bayes.BernoulliNB(binarize=binarize)\n",
    "        cls.fit(train_x,train_y)\n",
    "        train_score.append(cls.score(train_x,train_y))\n",
    "        test_score.append(cls.score(test_x,test_y))\n",
    "            \n",
    "    # 绘图：\n",
    "    fig = plt.figure()\n",
    "    ax = fig.add_subplot(111)\n",
    "    ax.plot(binarizes,train_score,label='Training Score')\n",
    "    ax.plot(binarizes,test_score, label='Testing Score')\n",
    "    ax.set_xlabel(r'binarize')\n",
    "    ax.set_ylabel('score')\n",
    "    ax.set_ylim(0,1.0)\n",
    "    ax.set_xlim(min_x-1,max_x+1)\n",
    "    ax.set_title('BernoulliNB')\n",
    "    ax.legend(loc='best')\n",
    "    plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYUAAAEWCAYAAACJ0YulAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9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eSoplEC2p6DrKYhIVGUrGenSXn2tMpNC/4Pgwudgp5ptLyttTiGmzgaYNGkS7777bu5xc6bTbq5x48ax9957M3ToUIYPH86MGTMK0q60Iv0OgAunQu99S7rZyqyfVHeBPvuVOwopk+ZMnd0ckyZNYsSIEfTu3Rto3nTazTF16lQef/xxXn75Zaqqqli1alVe02I0lEqldKhra1PdBfoMLflm9S2R8nr0B/Du/MK22XtfOOG6vFa9/fbbGT9+PHV1dYwaNYobb7yRTCbDeeedx5w5c3B3LrjgAnbaaSfmzJnDaaedRvv27XnppZf43Oc+t83ptBcvXsxZZ53Fhg0bOOmkkxg/fjxr1qz5VAwrV66kV69euTmVevXqlXtt+vTpXHHFFWzYsIHq6mqeeeYZzIyLLrqI2bNnk0wm+f3vf88RRxzBxIkTeeSRR1i7di2xWIynnnqK6667jgceeIBNmzZx6qmn5qYCF8mqzPKRSBNeeeUVHnzwQZ5//nnmzJlDKpXinnvuYdasWXzwwQfMnz+fV155hXPOOYfTTjuNYcOGce+99zJnzpxPTYoHW59O+7LLLuPKK69k/vz59OnTp8k4xowZwxtvvMGee+7JJZdckpt1ddOmTZx++umMHz+euXPn8vjjj9OuXTtuuOEG2rVrx/z587nzzjs5++yzc2Wwl19+mQceeICnnnqKKVOmsGzZMqZPn86cOXN4/vnnef7554v4iUprpJ6ClFeev+iL4cknn2TGjBm5qaU3btxI//79Of7443nttde4/PLL+fznP8/o0aO32dbWptOePn06U6ZMAeDMM8/kqquu2mLdLl26MHv2bKZOncozzzzDqaeeyq9//Wv22WcfdtllF0aMGAGQmyNp2rRpfPe73wVg7733Zuedd87NczR69Gi6d+8OwOOPP86jjz7K8OHDgeBs6tdffz03dbYIKCmI5Lg7X//61/nJT36yxWvz5s3j0UcfZfz48dx///1MmDDhM9tq7nTaW5NIJDj66KM5+uijqamp4d5772WfffbZrjZgy6myr7rqKsaOHbvd7UjlUPlIJHTsscdy33338cEHHwDBUUrLli1j1apVuDtf/vKXGTduHLNnzwagc+fOfPzxx9u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erUYwnGwJ4CFgNPAjuEy44EJjZY9+vh93wJcF4E4l5CUHfPfsezRwHuDEz5rO9UmeO+M/zuziPY0fdpHHf4eIt9T5RvmuZCRERyKqV8JCIizaCkICIiOUoKIiKSo6QgIiI5SgoiIpKjpCAVzcwGNpz5ssHzE82spkDbGGlmNxSiLZFi0yGpUtHCOaUecfd9itR+wj+Z7E0k8tRTEIGEmd1lZovM7O9m1sHMnjWzkQBmts7MfhpOgveime0UPv8FC6698bKZPdng+WvM7E4z+xfBNciPMrNHwtemNJh/f214bYN4eE2BGeHkaheW7ZOQiqekIAJ7An909yFALcG1NRrqCLzowSR4zwHnh89PAw529+EEUyJ/r8E6NcCx7n5Gw4bc/UR3H0ZwRuxbBBPqjSWY5uMA4ADgfDMbVMg3KNJciXIHIBIBb7v7v8L7fwEub/R6HfBIeH8WcFx4vx9wbzgHThXw7wbrTHb3jU1tLJxA707gK+6+1sxGA0PN7NRwka7A4EbtiZSEkoLIllNMN35c758MvqX55P/NH4DfuvtkMzuK4EpcWeub2pCZxQl6FePcPTvAbcBl7l7WielEQOUjEYBdzOyQ8P6ZBGWh5ujKJ9MgN/dax9cB89z9ngbPPQZcHE6TjpntEc4EKlJySgoi8BrBRVsWEVy3+E/NXO8a4G9mNgv4oJnrXEkwdXV2sPkkYCKwEJgdHh57M+rFS5nokFQREclRT0FERHKUFEREJEdJQUREcpQUREQkR0lBRERylBRERCRHSUFERHL+PxgDRYTbRK5mAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "# 查看伯努利贝叶斯训练结果：\n",
    "train_x,test_x, train_y, test_y = load_data()\n",
    "test_BernoulliNB_binarize(train_x, test_x, train_y, test_y)"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.5"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
